package day06;

public class nums {
    public static void main(String[] args) {
        int a = 12;
        int b = 20;
        int aum = add(a,b);
        long  s =0;
        for (int i = 1; i <=10;i++){
           s += factorial(i);

        }
        System.out.println(s);
        System.out.println("sum="+aum);
        System.out.println(s);
    }
    public static int add(int n1,int n2){
        int sum = n1+n2;
        return sum;
    }
    public void ia(){

    }
    static long factorial(int n){
        if(n==1){//递归头
            return 1;
        } else{//递归体
            return n*factorial(n-1);
            //n! = n * (n-1)
        }
    }
}
